﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TestPlatform.UnitTestFramework;
using NewsReaderApp.Helpers;

namespace UnitTests
{
    [TestClass]
    public class AppTests
    {
        [TestMethod]
        public void ShouldReplaceHTMLEntities()
        {
            //string clean = HtmlToXamlConverter.CleanupHTML("&apos;");
            //Assert.AreEqual("'", clean);

            string clean = HtmlToXamlConverter.CleanupHTML("&quot;");
            Assert.AreEqual("\"", clean);

            clean = HtmlToXamlConverter.CleanupHTML("&#8211;");
            Assert.AreEqual("–", clean);

            clean = HtmlToXamlConverter.CleanupHTML("&#x2013;");
            Assert.AreEqual("–", clean);

            clean = HtmlToXamlConverter.CleanupHTML("&#X2013;");
            Assert.AreEqual("–", clean);

            clean = HtmlToXamlConverter.CleanupHTML("&#8220;");
            Assert.AreEqual("“", clean);
        }
    }
}
